package com.sky.entity;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class OrderEntity implements Serializable {
    // 1待付款 2待接单 3已接单 4派送中 5已完成 6已取消 7退款
    public static final Integer TO_BE_PAID = 1;
    public static final Integer TO_BE_CONFIRMED = 2;
    public static final Integer CONFIRMED = 3;
    public static final Integer DELIVERED = 4;
    public static final Integer COMPLETED = 5;
    public static final Integer CANCELLED = 6;
    public static final Integer REFUND = 7;

    // 1微信 2支付宝
    public static final Integer WXPAY = 1;
    public static final Integer ALIPAY = 2;

    // 0未支付 1已支付 2退款
    public static final Integer UNPAID = 0;
    public static final Integer PAID = 1;
    public static final Integer REFUNDING = 2;

    // 1立即送出 0选择具体时间
    public static final Integer IMMEDIATELY_SENT = 1;
    public static final Integer SELECT_TIME = 0;

    // 1按餐量提供 0选择具体数量
    public static final Integer BY_QUANTITY = 1;
    public static final Integer SELECT_QUANTITY = 0;

    private Long id;
    @ApiModelProperty("订单号")
    private String number;
    @ApiModelProperty("订单状态 1待付款 2待接单 3已接单 4派送中 5已完成 6已取消 7退款")
    private Integer status;
    @ApiModelProperty("下单用户")
    private Long userId;
    @ApiModelProperty("地址id")
    private Long addressBookId;
    @ApiModelProperty("下单时间")
    private LocalDateTime orderTime;
    @ApiModelProperty("结账时间")
    private LocalDateTime checkoutTime;
    @ApiModelProperty("支付方式 1微信 2支付宝")
    private Integer payMethod;
    @ApiModelProperty("支付状态 0未支付 1已支付 2退款")
    private Integer payStatus;
    @ApiModelProperty("实收金额")
    private Integer amount;
    @ApiModelProperty("备注")
    private String remark;
    @ApiModelProperty("手机号")
    private String phone;
    @ApiModelProperty("地址")
    private String address;
    @ApiModelProperty("用户名称")
    private String userName;
    @ApiModelProperty("收货人")
    private String consignee;
    @ApiModelProperty("订单取消原因")
    private String cancelReason;
    @ApiModelProperty("订单拒绝原因")
    private String rejectionReason;
    @ApiModelProperty("订单取消时间")
    private LocalDateTime cancelTime;
    @ApiModelProperty("预计送达时间")
    private LocalDateTime estimatedDeliveryTime;
    @ApiModelProperty("配送状态 1立即送出  0选择具体时间")
    private Integer deliveryStatus;
    @ApiModelProperty("送达时间")
    private LocalDateTime deliveryTime;
    @ApiModelProperty("打包费")
    private Integer packAmount;
    @ApiModelProperty("餐具数量")
    private Integer tablewareNumber;
    @ApiModelProperty("餐具数量状态 1按餐量提供 0选择具体数量")
    private Integer tablewareStatus;
}
